import { defineStore } from 'pinia'
import type { aiConfig } from '/@/stores/interface/aiConfig'

export const useAiConfig = defineStore('aiConfig', {
    state: (): aiConfig => {
        return {
            chat: {
                title: ''
            },
            notice: {
                show: 0,
                title: '',
                content: '',
            },
            menus: {}
        }
    },
    actions: {
        dataFill(state: aiConfig) {
            this.$state = { ...this.$state, ...state }
        },
    },
    persist: {
        key: 'aiConfig',
    }
})
